package jamorham.keks;

import static jamorham.keks.util.Util.hexStringToByteArray;

/**
 * JamOrHam
 *
 * KEKS configuration
 */

public class Config {
    private static final byte[][] KEY1 = {
            hexStringToByteArray("039503316070A26884ECD320106080A26884ECD330107030240040A08F620F921D6251ACB39895DB5C49AB30033E94D7E61C9EFE8F67107E3E0F5DC4E85FDB3EF05CCAA14C33C30D63F23D51F26A1624619087F06F06743031AEA9"),
            hexStringToByteArray("03183920100003316070A26884ECD320106080A26884ECD33010704097037720101040025351C2844410F9815BE04794FBC0AF098652F1AF232648BADB684F3506FB30D10AA06080A26884ECD33010701A4430240040A08F620F921D6251ACB39895DB5C49AB30033E94D7E61C9EFE8F67107E3E0F5DC4E85FDB3EF05CCAA14C33C30D63F23D51F26A1624619087F06F06743031AEA9")};
    private static final byte[][] KEY2 = {
            hexStringToByteArray("039503316070A26884ECD320106080A26884ECD330107030240040840CCEF4364F4F87D6B0D58F393050FC0ED7301604CFF5F03EAFF546E5EDAC66E0359991C66A8C9F91DE3F4E7CFD4936E26C593835EFE80951A79AAAACC5B285"),
            hexStringToByteArray("03183920100003316070A26884ECD320106080A26884ECD33010704097037720101040028DC3343BBD703B1D62614568237CC3CD786CA6926D7B492D33A5FCC10590A9CA0AA06080A26884ECD33010701A4430240040840CCEF4364F4F87D6B0D58F393050FC0ED7301604CFF5F03EAFF546E5EDAC66E0359991C66A8C9F91DE3F4E7CFD4936E26C593835EFE80951A79AAAACC5B285")};
    private static final byte[] REFERENCE_B = hexStringToByteArray("1A808807F7E953C754A02E0D3C51FA2D2ED3D7699430A51D910D4FBCBA3EEF2F");
    private static final byte[] ALICE_B = hexStringToByteArray("36C69656E647");
    private static final byte[] BOB_B = hexStringToByteArray("375627675627");
    private static final byte[] CMD1 = new byte[]{0x0A};
    private static final byte[] SPARAMB = new byte[]{0x02};
    private static final byte[] TIME_EXTENDEDB = new byte[]{0x06, 0x19};
    private static final byte[] TIME_EXTENDED2B = new byte[]{(byte) 0xFF, 0x06, 0x01};
    private static final byte[] TIME_EXTENDED3B = new byte[]{0x06, 0x00};
    private static final byte[] PREFIX_B = new byte[]{0x30, 0x30};
    private static final byte[] ONE_GET_DATA_4E_CMD = new byte[]{0x4e, 0x0a, (byte)0xa9};
    private static final byte[] GET_DATA_4E_CMD = new byte[]{0x4e};
    private static final byte[] CHALLENGE_OUTB = new byte[]{0x0d, 0x00, 0x02};

    public enum Get {
        SPARAM(SPARAMB),
        TIME_EXTENDED(TIME_EXTENDEDB),
        TIME_EXTENDED2(TIME_EXTENDED2B),
        TIME_EXTENDED3(TIME_EXTENDED3B),
        PREFIX(PREFIX_B),
        KEYCMD(CMD1),
        KEY1A(KEY1[0]),
        KEY1B(KEY1[1]),
        KEY2A(KEY2[0]),
        KEY2B(KEY2[1]),
        ALICE(ALICE_B),
        BOB(BOB_B),
        REFERENCE(REFERENCE_B),
        GETDATA(ONE_GET_DATA_4E_CMD),
        GETDATA2(GET_DATA_4E_CMD),
        CHALLENGE_OUT(CHALLENGE_OUTB);

        public final byte[] bytes;
        Get(byte[] bytes) {
            this.bytes = bytes;
        }

    }

}
